/*
 * LDIR
 *
 * LDIR, a GPS cartography application built for Let's Do It Romania eco
 * campaign.
 * Copyright (C) 2010 Genera Software <office@generasoftware.com>
 *
 * http://generasoftware.com/
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 */
#ifndef CWASTEINFO_H
#define CWASTEINFO_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "WsObject.h"

// CLASS DECLARATION

/**
 *  CCWasteInfo
 *
 */
class CWasteInfo : public CWsObject, public MSerializable
    {
public:
    // Constructors and destructor

    /**
     * Destructor.
     */
    ~CWasteInfo();

    /**
     * Two-phased constructor.
     */
    static CWasteInfo* NewL();

    /**
     * Two-phased constructor.
     */
    static CWasteInfo* NewLC();

    void ExternalizeL( RWriteStream& aStream ) const;
    void InternalizeL( RReadStream& aStream );

    HBufC8* EncodeL( CJsonGenerator& aJsonGenerator );
    void DecodeL( const TDesC8& aDesC, CJsonParser& aJsonParser );

    void ExternalizeToEntityL();
    CWasteInfo* CloneL();

private:

    /**
     * Constructor for performing 1st stage construction
     */
    CWasteInfo();

    /**
     * EPOC default constructor for performing 2nd stage construction
     */
    void ConstructL();

public:
    // DATA
    TBuf<16> iId;
    TReal iLongitude;
    TReal iLatitude;
    RBuf iCounty;
    TUint iDiameter;
    TUint iLength;
    TUint iWidth;
    TUint iHeight;
    TUint iBagEq;
    TBool iRoadAccess;
    TBool iRainAccess;
    TBool iIsDispersed;
    TUint iUnreciclable;
    TUint iGlass;
    TUint iMetal;
    TUint iPlastic;
    TUint iCardboard;
    TUint iRubber;
    TUint iOversized;
    TUint iConstruction;
    TBool iExcluded;
    RBuf iComment;
    TTime iTime;
    };

#endif // CWASTEINFO_H
